Skip to content

Conversation

@amadeus
Copy link
Collaborator

@amadeus amadeus commented Mar 5, 2016

Been messing around with ES6 lately, so I decided to take the plunge and add proper Class support.

There is a good chance this may have bugs, or things that I have overlooked, however it appears to be working quite well so far.

This is before - as you can see (or not, if you aren't familiar with my color scheme), it's creating the method declarations within the class definition as actual function executions.
before

This is after - it properly interprets the function definitions and re-uses existing match groups. It also has the benefit of working in very bizarre contexts, as can be seen here (I probably haven't tested every possible scenario, so please let me know if you find issues)
after

@amadeus
Copy link
Collaborator Author

amadeus commented Mar 5, 2016

There may also may be a good discussion surrounding what highlighting groups this should be matched with.

@davidchambers
Copy link
Collaborator

Nice work! This is a huge improvement. :)

* Added support for . within class definition and mapped to jsClassNoise
* Linked jsClassNoise to Noise
* Tweaked code/whitespace alignment of the jsClass* section
@amadeus
Copy link
Collaborator Author

amadeus commented Mar 8, 2016

I've used this a bunch more, and it's appeared to work well. Any objections to merging this into Dev?

@davidchambers
Copy link
Collaborator

No objections. :)

amadeus added a commit that referenced this pull request Mar 9, 2016
Adding first pass at ES6 Class support
@amadeus amadeus merged commit 152f36e into pangloss:develop Mar 9, 2016
@amadeus amadeus deleted the es6-class-support branch March 9, 2016 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants